Skip to content

London| 26-ITP-May | Mandip Sanger | Sprint 3 | Alarm Clock - #1435

Open
mandipsanger wants to merge 6 commits into
CodeYourFuture:mainfrom
mandipsanger:Sprint-3
Open

London| 26-ITP-May | Mandip Sanger | Sprint 3 | Alarm Clock#1435
mandipsanger wants to merge 6 commits into
CodeYourFuture:mainfrom
mandipsanger:Sprint-3

Conversation

@mandipsanger

@mandipsanger mandipsanger commented Aug 14, 2026

Copy link
Copy Markdown

Self checklist

Sprint 3 AlarmClock

@github-actions

This comment has been minimized.

@mandipsanger mandipsanger added 📅 Sprint 3 Assigned during Sprint 3 of this module Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. labels Aug 14, 2026

@cjyuan cjyuan left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • You missed updating index.html according to an instruction in readme.md.

  • Currently when starting a new countdown, the application does not always return to a clean initial state, which can lead to inconsistent behaviour between runs.

    Note: a user may not click the "Stop Alarm" button first before starting a new count down.

Comment thread Sprint-3/alarmclock/alarmclock.js
@cjyuan cjyuan added Reviewed Volunteer to add when completing a review with trainee action still to take. and removed Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. labels Aug 14, 2026
@mandipsanger mandipsanger added Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. and removed Reviewed Volunteer to add when completing a review with trainee action still to take. labels Aug 18, 2026
<label for="alarmSet">Set time to:</label>
<input id="alarmSet" type="number" />
<label for="alarmSet">Set time in seconds:</label>
<input id="alarmSet" type="number" min="1" step="1" placeholder="Enter seconds" />

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note: Without a form, the browser won't check the input against the constraints min="1" step="1".

Change is optional.

Comment on lines +11 to +20
if (isNaN(numberValue)) {
alert("only enter a valid number.");
return; // exit a function if not a number
}

//step 3 validate if it is an integer
if (!Number.isInteger(numberValue)) {
alert("only enter an integer value.");
return; // exit a function if not an integer
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The integer check could also pick up NaN.

Comment on lines +42 to +44
// Stop an existing timer
clearInterval(timer);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • What else should also be reset?

Note: a user may not click the "Stop Alarm" button first before starting a new count down.

@cjyuan cjyuan added Reviewed Volunteer to add when completing a review with trainee action still to take. and removed Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. labels Aug 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Reviewed Volunteer to add when completing a review with trainee action still to take. 📅 Sprint 3 Assigned during Sprint 3 of this module

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants